package com.ruoyi.back.domain

import com.baomidou.mybatisplus.annotation.*
import com.ruoyi.back.enums.CheckStatusEnum
import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import org.springframework.format.annotation.DateTimeFormat
import java.util.*
import javax.persistence.*

@ApiModel("模板推荐")
@Entity
@Table(name = "fly_template_recommend")
@TableName("fly_template_recommend")
data class TemplateRecommend(

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("id 更新的时候需要传递")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    var id: Long? = null,

    /**
     * 创建人
     */
    @ApiModelProperty(hidden = true)
    var createBy: Long? = 0L,

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(hidden = true)
    var createTime: Date? = null,

    /**
     * 更新人
     */
    @ApiModelProperty(hidden = true)
    var updateBy: Long? = 0L,

    /**
     * 更新时间
     */
    @ApiModelProperty(hidden = true)
    @TableField(fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    var updateTime: Date? = null,

    /**
     * 逻辑删除
     */
    @ApiModelProperty(hidden = true)
    @TableLogic
    var deleted: Int? = 0,

    @ApiModelProperty("推荐类型 1.视频 2.图片")
    var type: Int? = null,

    @ApiModelProperty("用户作品记录id")
    var userRecordId: Long? = null,

    @ApiModelProperty("用户名称")
    var username: String? = null,

    @ApiModelProperty("用户id")
    var userId: String? = null,

    @ApiModelProperty("所属分类")
    var categoryId: Long? = null,

    @ApiModelProperty("标题")
    var title: String? = null,

    @ApiModelProperty("封面")
    var cover: String? = null,

    @ApiModelProperty("内容")
    var content: String? = null,

    @ApiModelProperty("审核通过之后的模板id")
    var templateId: Long? = null,

    @ApiModelProperty("审核状态")
    var checkStatus: Int? = CheckStatusEnum.PRE_CHECK.code,
)
